#define _CRT_SECURE_NO_WARNINGS 1
#include"Stack.hpp"
#include<iostream>

using std::cout;
using std::cin;
using std::endl;

class Stack
{
private:
	int* arr;
	int capacity;
	int top;
	Data today;
public:
	Stack(int init_capacity = 4)
	{
		arr = (int*)malloc(sizeof(int) * init_capacity);
		if (arr == NULL)
		{
			perror("malloc fail");
			return;
		}
		capacity = init_capacity;
		top = 0;
		cout << "Stack()" << endl;
	}

	~Stack()
	{
		free(arr);
		top = 0;
		capacity = 0;
		cout << "~Stack()" << endl;
	}
};

class Data
{
private:
	int _year;
	int _mouth;
	int _day;
public:
	Data(int year = 2023, int mouth = 0, int day = 0)
	{
		_year = year;
		_mouth = mouth;
		_day = day;
		cout << "Data()" << endl;
	}

	~Data() 
	{
		cout << "~Data()" << endl;
	}
};

int main()
{
	Stack s(8);
	return 0;
}